cmake_minimum_required(VERSION 2.8.3)
project(zubot_nav)
#set(CMAKE_BUILD_TYPE Release)
add_compile_options(-std=c++11)
find_package(catkin REQUIRED COMPONENTS
  cv_bridge
  image_transport
  sensor_msgs
  actionlib_msgs
  actionlib
  roscpp
  rospy
  tf
  std_msgs
  common_msg
)
#set_directory_properties(PROPERTIES COMPILE_OPTIONS "-std=c++11")
## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
find_package(OpenCV REQUIRED)


catkin_package(
  INCLUDE_DIRS include
#  LIBRARIES dashgo_driver
  CATKIN_DEPENDS roscpp rospy std_msgs common_msg
#  DEPENDS system_lib
#  CATKIN_DEPENDS message_runtime
)

include_directories(include ${catkin_INCLUDE_DIRS})

file(GLOB_RECURSE cpp_list_cpp src/*.cpp src/*.c)
add_executable(zubot_nav ${cpp_list_cpp})

target_link_libraries(zubot_nav 
  ${catkin_LIBRARIES} 
  ${OpenCV_LIBS} 
  /usr/lib/x86_64-linux-gnu/libglog.so 
  /usr/lib/x86_64-linux-gnu/libevent.so 
  /usr/lib/x86_64-linux-gnu/libcurl.so)

install(TARGETS ${PROJECT_NAME} zubot_nav
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)

install(DIRECTORY launch/
    DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch)
install(DIRECTORY config/
    DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config)
